package com.demo.common.plugin;

import com.jfinal.plugin.IPlugin;
import com.jfinal.template.activerecord.SqlUtil;


public class EnjoySqlPlugin implements IPlugin {
    private String configName;
    private boolean devMode;
    private String sqlTemplatePath;

    public EnjoySqlPlugin() {
        this.configName = "main";
        this.devMode = false;
        this.sqlTemplatePath = "sql";
    }

    public EnjoySqlPlugin(String configName, boolean devMode,String sqlTemplatePath) {
        this.configName = configName;
        this.devMode = devMode;
        this.sqlTemplatePath = sqlTemplatePath;
    }

    public boolean start() {
        SqlUtil.start(configName, devMode, sqlTemplatePath);
        return true;
    }


    public boolean stop() {
        return true;
    }
}
